{% extends 'base.html' %}
{% block page_title %}
  {% if title %}{{ title }}{% else %}{{ TITLE }}{% endif %}
{% endblock %}
{% block content %}
<div class="container">
  {% for error in form.non_field_errors %}
    <div class="alert alert-info" role="alert">
      {{ error }}
    </div>
  {% endfor %}
  <div class="row">
    <form class="input-form col-11" method="post">
      {% csrf_token %}
      {% for field in form %}
        <div class="form-group">
          <label>
            {% if field.field.required %}<em class="red-text">*</em> {% endif %}
            {{ field.label }}
          </label>
          {{ field }}
          {{ field.errors }}
          {{ field.help_text | safe }}
        </div>
      {% endfor %}
      <button type="submit" class="btn btn-info col-12">提交</button>
    </form>
  </div>
</div>
{% endblock %}
